home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 July & August / PCWorld_2006-07-08_cd.bin / komunikace / apache / apache_2[1].2.2-win32-x86-no_ssl.msi / Data1.cab / _E79A15F15710A7C0C117D5EF88B9F1B3 < prev    next >
Extensible Markup Language  |  2006-01-15  |  9KB  |  155 lines

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
  4.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  5.               This file is generated from xml source: DO NOT EDIT
  6.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  7.       -->
  8. <title>mod_authn_dbd - Apache HTTP Server</title>
  9. <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
  10. <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
  11. <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
  12. <link href="../images/favicon.ico" rel="shortcut icon" /></head>
  13. <body>
  14. <div id="page-header">
  15. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
  16. <p class="apache">Apache HTTP Server Version 2.2</p>
  17. <img alt="" src="../images/feather.gif" /></div>
  18. <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
  19. <div id="path">
  20. <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.2</a> > <a href="./">Modules</a></div>
  21. <div id="page-content">
  22. <div id="preamble"><h1>Apache Module mod_authn_dbd</h1>
  23. <div class="toplang">
  24. <p><span>Available Languages: </span><a href="../en/mod/mod_authn_dbd.html" title="English"> en </a></p>
  25. </div>
  26. <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>User authentication using an SQL database</td></tr>
  27. <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  28. <tr><th><a href="module-dict.html#ModuleIdentifier">ModuleáIdentifier:</a></th><td>authn_dbd_module</td></tr>
  29. <tr><th><a href="module-dict.html#SourceFile">SourceáFile:</a></th><td>mod_authn_dbd.c</td></tr>
  30. <tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.1 and later</td></tr></table>
  31. <h3>Summary</h3>
  32.  
  33.     <p>This module provides authentication front-ends such as
  34.     <code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code> and <code class="module"><a href="../mod/mod_auth_basic.html">mod_auth_basic</a></code>
  35.     to authenticate users by looking up users in SQL tables.
  36.     Similar functionality is provided by, for example,
  37.     <code class="module"><a href="../mod/mod_authn_file.html">mod_authn_file</a></code>.</p>
  38.     <p>This module relies on <code class="module"><a href="../mod/mod_dbd.html">mod_dbd</a></code> to specify
  39.     the backend database driver and connection parameters, and
  40.     manage the database connections.</p>
  41.  
  42.     <p>When using <code class="module"><a href="../mod/mod_auth_basic.html">mod_auth_basic</a></code> or
  43.     <code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code>, this module is invoked via the
  44.     <code class="directive"><a href="../mod/mod_auth_basic.html#authbasicprovider">AuthBasicProvider</a></code> or
  45.     <code class="directive"><a href="../mod/mod_auth_digest.html#authdigestprovider">AuthDigestProvider</a></code>
  46.     with the <code>dbd</code> value.</p>
  47. </div>
  48. <div id="quickview"><h3 class="directives">Directives</h3>
  49. <ul id="toc">
  50. <li><img alt="" src="../images/down.gif" /> <a href="#authdbduserpwquery">AuthDBDUserPWQuery</a></li>
  51. <li><img alt="" src="../images/down.gif" /> <a href="#authdbduserrealmquery">AuthDBDUserRealmQuery</a></li>
  52. </ul>
  53. <h3>Topics</h3>
  54. <ul id="topics">
  55. <li><img alt="" src="../images/down.gif" /> <a href="#example">Configuration Example</a></li>
  56. </ul><h3>See also</h3>
  57. <ul class="seealso">
  58. <li><code class="directive"><a href="../mod/core.html#authname">AuthName</a></code></li>
  59. <li><code class="directive"><a href="../mod/core.html#authtype">AuthType</a></code></li>
  60. <li>
  61.   <code class="directive"><a href="../mod/mod_auth_basic.html#authbasicprovider">AuthBasicProvider</a></code>
  62. </li>
  63. <li>
  64.   <code class="directive"><a href="../mod/mod_auth_digest.html#authdigestprovider">AuthDigestProvider</a></code>
  65. </li>
  66. <li><code class="directive"><a href="../mod/mod_dbd.html#dbdriver">DBDriver</a></code></li>
  67. <li><code class="directive"><a href="../mod/mod_dbd.html#dbdparams">DBDParams</a></code></li>
  68. </ul></div>
  69. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  70. <div class="section">
  71. <h2><a name="example" id="example">Configuration Example</a></h2>
  72.  
  73. <p>This simple example shows use of this module in the context of
  74. the Authentication and DBD frameworks.</p>
  75. <div class="example"><pre>
  76. #Database Management
  77.  
  78. #Use the PostgreSQL driver
  79. <code>DBDriver pgsql</code>
  80.  
  81. #Connection string: database name and login credentials
  82. <code>DBDParams "dbname=htpasswd user=apache password=xxxxxx"</code>
  83.  
  84. #Parameters for Connection Pool Management
  85. <code>DBDMin  1
  86. DBDKeep 2
  87. DBDMax  10
  88. DBDExptime 60</code>
  89.  
  90. #Authentication Section
  91. <code><Directory /usr/www/myhost/private></code>
  92.  
  93.     #mod_auth configuration for authn_dbd
  94.     <code>AuthType Basic
  95.     AuthName "My Server"
  96.     AuthBasicProvider dbd</code>
  97.  
  98.     #authz configuration
  99.     <code>Require valid-user</code>
  100.  
  101.     #SQL query to verify a user
  102.     #(note: DBD drivers recognise both stdio-like %s and native syntax)
  103.     <code>AuthDBDUserPWQuery "select password from authn where username = %s"
  104. </Directory></code>
  105. </pre></div>
  106. </div>
  107. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  108. <div class="directive-section"><h2><a name="AuthDBDUserPWQuery" id="AuthDBDUserPWQuery">AuthDBDUserPWQuery</a> <a name="authdbduserpwquery" id="authdbduserpwquery">Directive</a></h2>
  109. <table class="directive">
  110. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>SQL query to look up a password for a user</td></tr>
  111. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthDBDUserPWQuery <var>query</var></code></td></tr>
  112. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
  113. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  114. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_authn_dbd</td></tr>
  115. </table>
  116.     <p>The <code class="directive">AuthDBDUserPWQuery</code> specifies an
  117.     SQL query to look up a password for a specified user.
  118.     The query must take a single string (typically SQL varchar)
  119.     argument (username), and return a single value (encrypted password).
  120.     </p>
  121.     <div class="example"><p><code>
  122.     AuthDBDUserPWQuery "SELECT password FROM authn WHERE username = %s"
  123.     </code></p></div>
  124.  
  125.  
  126. </div>
  127. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  128. <div class="directive-section"><h2><a name="AuthDBDUserRealmQuery" id="AuthDBDUserRealmQuery">AuthDBDUserRealmQuery</a> <a name="authdbduserrealmquery" id="authdbduserrealmquery">Directive</a></h2>
  129. <table class="directive">
  130. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>SQL query to look up a password hash for a user and realm.
  131. </td></tr>
  132. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthDBDUserRealmQuery <var>query</var></code></td></tr>
  133. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
  134. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  135. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_authn_dbd</td></tr>
  136. </table>
  137.     <p>The <code class="directive">AuthDBDUserRealmQuery</code> specifies an
  138.     SQL query to look up a password for a specified user and realm.
  139.     The query must take two string (typically SQL varchar) arguments
  140.     (username and realm), and return a single value (encrypted password).
  141.     </p>
  142.     <div class="example"><p><code>
  143.     AuthDBDUserRealmQuery "SELECT password FROM authn
  144.                               WHERE username = %s AND realm = %s"
  145.     </code></p></div>
  146.  
  147.  
  148. </div>
  149. </div>
  150. <div class="bottomlang">
  151. <p><span>Available Languages: </span><a href="../en/mod/mod_authn_dbd.html" title="English"> en </a></p>
  152. </div><div id="footer">
  153. <p class="apache">Copyright 1995-2006 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
  154. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
  155. </body></html>